document.onkeydown = null;
document.onkeypress = null;

function Print()
{

if (typeof(printMain) != "undefined")
{
printMain.focus();
}
window.print();
}

function Close()
{
window.close();
}

function PrintJsWindowOnLoad()
{
focus();
}

window.attachEvent('onload', PrintJsWindowOnLoad);
